Integrand size = 23, antiderivative size = 141 \[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx=-\frac {b \operatorname {Hypergeometric2F1}\left (1,\frac {m}{2},\frac {2+m}{2},\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right ) (d \sec (e+f x))^m}{\left (a^2+b^2\right ) f m}+\frac {\operatorname {AppellF1}\left (\frac {1}{2},1,1-\frac {m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2} \tan (e+f x)}{a f} \]
-b*hypergeom([1, 1/2*m],[1+1/2*m],b^2*sec(f*x+e)^2/(a^2+b^2))*(d*sec(f*x+e ))^m/(a^2+b^2)/f/m+AppellF1(1/2,1,1-1/2*m,3/2,b^2*tan(f*x+e)^2/a^2,-tan(f* x+e)^2)*(d*sec(f*x+e))^m*tan(f*x+e)/a/f/((sec(f*x+e)^2)^(1/2*m))
Result contains complex when optimal does not.
Time = 15.16 (sec) , antiderivative size = 1158, normalized size of antiderivative = 8.21 \[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx=\frac {(d \sec (e+f x))^m \left (b-b \sec ^2(e+f x)^{m/2}+a m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-\frac {m}{2},\frac {3}{2},-\tan ^2(e+f x)\right ) \tan (e+f x)+b \operatorname {AppellF1}\left (-m,-\frac {m}{2},-\frac {m}{2},1-m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2}\right )}{f (a+b \tan (e+f x)) \left (a m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-\frac {m}{2},\frac {3}{2},-\tan ^2(e+f x)\right ) \sec ^2(e+f x)-b m \sec ^2(e+f x)^{m/2} \tan (e+f x)+b m \operatorname {AppellF1}\left (-m,-\frac {m}{2},-\frac {m}{2},1-m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{m/2} \tan (e+f x) \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2}+b \sec ^2(e+f x)^{m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (-\frac {(a-i b) b m^2 \operatorname {AppellF1}\left (1-m,1-\frac {m}{2},-\frac {m}{2},2-m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1-m) (a+b \tan (e+f x))^2}-\frac {(a+i b) b m^2 \operatorname {AppellF1}\left (1-m,-\frac {m}{2},1-\frac {m}{2},2-m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1-m) (a+b \tan (e+f x))^2}\right )-\frac {1}{2} b m \operatorname {AppellF1}\left (-m,-\frac {m}{2},-\frac {m}{2},1-m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1-\frac {m}{2}} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (-\frac {b^2 \sec ^2(e+f x) (-i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )-\frac {1}{2} b m \operatorname {AppellF1}\left (-m,-\frac {m}{2},-\frac {m}{2},1-m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1-\frac {m}{2}} \left (-\frac {b^2 \sec ^2(e+f x) (i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )+a m \sec ^2(e+f x) \left (-\operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-\frac {m}{2},\frac {3}{2},-\tan ^2(e+f x)\right )+\left (1+\tan ^2(e+f x)\right )^{-1+\frac {m}{2}}\right )\right )} \]
((d*Sec[e + f*x])^m*(b - b*(Sec[e + f*x]^2)^(m/2) + a*m*Hypergeometric2F1[ 1/2, 1 - m/2, 3/2, -Tan[e + f*x]^2]*Tan[e + f*x] + (b*AppellF1[-m, -1/2*m, -1/2*m, 1 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f *x])]*(Sec[e + f*x]^2)^(m/2))/(((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x ]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2))))/(f*(a + b *Tan[e + f*x])*(a*m*Hypergeometric2F1[1/2, 1 - m/2, 3/2, -Tan[e + f*x]^2]* Sec[e + f*x]^2 - b*m*(Sec[e + f*x]^2)^(m/2)*Tan[e + f*x] + (b*m*AppellF1[- m, -1/2*m, -1/2*m, 1 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b *Tan[e + f*x])]*(Sec[e + f*x]^2)^(m/2)*Tan[e + f*x])/(((b*(-I + Tan[e + f* x]))/(a + b*Tan[e + f*x]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f* x]))^(m/2)) + (b*(Sec[e + f*x]^2)^(m/2)*(-1/2*((a - I*b)*b*m^2*AppellF1[1 - m, 1 - m/2, -1/2*m, 2 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])]*Sec[e + f*x]^2)/((1 - m)*(a + b*Tan[e + f*x])^2) - ((a + I*b)*b*m^2*AppellF1[1 - m, -1/2*m, 1 - m/2, 2 - m, (a - I*b)/(a + b*Tan[ e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])]*Sec[e + f*x]^2)/(2*(1 - m)*(a + b*Tan[e + f*x])^2)))/(((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2 )*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)) - (b*m*AppellF1[-m, -1/2*m, -1/2*m, 1 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*T an[e + f*x])]*(Sec[e + f*x]^2)^(m/2)*((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(-1 - m/2)*(-((b^2*Sec[e + f*x]^2*(-I + Tan[e + f*x]))/(a + b...
Time = 0.37 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.13, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 3994, 504, 333, 353, 78}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)}dx\) |
\(\Big \downarrow \) 3994 |
\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \int \frac {\left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{a+b \tan (e+f x)}d(b \tan (e+f x))}{b f}\) |
\(\Big \downarrow \) 504 |
\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (a \int \frac {\left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{a^2-b^2 \tan ^2(e+f x)}d(b \tan (e+f x))-\int \frac {b \tan (e+f x) \left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{a^2-b^2 \tan ^2(e+f x)}d(b \tan (e+f x))\right )}{b f}\) |
\(\Big \downarrow \) 333 |
\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (\frac {b \tan (e+f x) \operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2-m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a}-\int \frac {b \tan (e+f x) \left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{a^2-b^2 \tan ^2(e+f x)}d(b \tan (e+f x))\right )}{b f}\) |
\(\Big \downarrow \) 353 |
\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (\frac {b \tan (e+f x) \operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2-m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a}-\frac {1}{2} \int \frac {\left (\frac {\tan (e+f x)}{b}+1\right )^{\frac {m-2}{2}}}{a^2-b^2 \tan ^2(e+f x)}d\left (b^2 \tan ^2(e+f x)\right )\right )}{b f}\) |
\(\Big \downarrow \) 78 |
\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (\frac {b \tan (e+f x) \operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2-m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a}-\frac {b^2 \left (\frac {\tan (e+f x)}{b}+1\right )^{m/2} \operatorname {Hypergeometric2F1}\left (1,\frac {m}{2},\frac {m+2}{2},\frac {\tan ^2(e+f x) b^2+b^2}{a^2+b^2}\right )}{m \left (a^2+b^2\right )}\right )}{b f}\) |
((d*Sec[e + f*x])^m*((b*AppellF1[1/2, 1, (2 - m)/2, 3/2, (b^2*Tan[e + f*x] ^2)/a^2, -Tan[e + f*x]^2]*Tan[e + f*x])/a - (b^2*Hypergeometric2F1[1, m/2, (2 + m)/2, (b^2 + b^2*Tan[e + f*x]^2)/(a^2 + b^2)]*(1 + Tan[e + f*x]/b)^( m/2))/((a^2 + b^2)*m)))/(b*f*(Sec[e + f*x]^2)^(m/2))
3.7.43.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b *c - a*d)^n*((a + b*x)^(m + 1)/(b^(n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m}, x] && !IntegerQ[m] && IntegerQ[n]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[a^p*c^q*x*AppellF1[1/2, -p, -q, 3/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; F reeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] :> Simp[1/2 Subst[Int[(a + b*x)^p*(c + d*x)^q, x], x, x^2], x] /; FreeQ[ {a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*(x_)^2)^(p_)/((c_) + (d_.)*(x_)), x_Symbol] :> Simp[c I nt[(a + b*x^2)^p/(c^2 - d^2*x^2), x], x] - Simp[d Int[x*((a + b*x^2)^p/(c ^2 - d^2*x^2)), x], x] /; FreeQ[{a, b, c, d, p}, x]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[d^(2*IntPart[m/2])*((d*Sec[e + f*x])^(2*FracP art[m/2])/(b*f*(Sec[e + f*x]^2)^FracPart[m/2])) Subst[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 + b^2, 0] && !IntegerQ[m] && IntegerQ[n]
\[\int \frac {\left (d \sec \left (f x +e \right )\right )^{m}}{a +b \tan \left (f x +e \right )}d x\]
\[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{m}}{b \tan \left (f x + e\right ) + a} \,d x } \]
\[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int \frac {\left (d \sec {\left (e + f x \right )}\right )^{m}}{a + b \tan {\left (e + f x \right )}}\, dx \]
\[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{m}}{b \tan \left (f x + e\right ) + a} \,d x } \]
\[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{m}}{b \tan \left (f x + e\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int \frac {{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^m}{a+b\,\mathrm {tan}\left (e+f\,x\right )} \,d x \]